#ifndef MYTCPSERVER_H
#define MYTCPSERVER_H
#include <QTcpServer>
#include "mytcpsocket.h"
//重新封装的tcpserver类
class MyTcpServer : public QTcpServer
{
    //类既要继承QOBJECT，又写上Q_OBJECT的宏，以支持信号槽
    Q_OBJECT
public:
    MyTcpServer();
    static MyTcpServer &getIntance();
    void incomingConnection(qintptr socketDescriptor);
private:
    QList<MyTcpSocket*> m_tcpSocketList; // 存储服务器所有已经建立的Socket连接
};

#endif // MYTCPSERVER_H
